﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SME.Food.Surperise.Model;
using SME.Food.Surperise.BLL;

namespace SME.Food.Tricon.Web.AdminJS.MemberManage
{
    public partial class MemberModify : System.Web.UI.Page
    {

        public string hid = "";
        public int id, postId;
        public string Mem_No = ""
            , Mem_Name = ""
            , sexCheck=""           
            , PostSelect=""
            , Num_Card = ""
            ,type="";

        Bas_Member_BLL bll = new Bas_Member_BLL();

        protected void Page_Load(object sender, EventArgs e)
        {
            type=Request.QueryString["type"];
            if (type == "update")
            {
                hid = "update";
                Show();
            }
            else
            {
                hid = "add";
            }
            
        }

        public void Show()
        { 
           Mem_No=Request .QueryString["Mem_No"];
           Bas_Member_Model model=  bll.GetModel(Mem_No);
           if (model != null)
           {
               Mem_No = model.Mem_No;
               Mem_Name = model.Mem_Name;
               sexCheck = model.Mem_Sex.ToString();
               Num_Card = model.Mem_Card;
               PostSelect = model.Mem_Type.ToString();
           }
       }
    }
}